package com.demo.service.app.task;

import com.demo.service.app.service.MovieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class MovieTask {
    @Autowired
    private MovieService movieService;

    /**
     * 每分钟执行一次
     */
    @Scheduled(cron = "0 0/1 * * * ?")
    public void queryStore(){
        movieService.readMovie();
    }
}
